package com.zx.ticket.service.serviceImpl;

import com.zx.ticket.dao.AdminMapper;
import com.zx.ticket.entity.Admin;
import com.zx.ticket.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    @Override
    public int addAdmin(Admin admin) {
        return adminMapper.insertSelective(admin);
    }

    @Override
    public Admin selectByUsernameAndPassword(Admin admin) {
        return adminMapper.selectByUsernameAndPassword(admin.getUsername(),admin.getPassword());
    }

}
